package com.arraysdeepresearch;

import com.insideClass.Generics.GenericsInterface.Generator;

import java.util.LinkedHashSet;
import java.util.Set;

class Government implements Generator<String>{
    String[] foundation=("strage women lying in ponds"+
            "distributing swords in no basis for a system of "+
            "government").split(" ");
    private int index;
    @Override
    public String next() {
        return foundation[index++];
    }
}
/**
 * @author 13699
 */
public class CollectionDataTest {

    public static void main(String[] args) {
        Set<String> set=new LinkedHashSet<>(new CollectionData<String>(new Government(),15));
        set.addAll(CollectionData.list(new Government(),15));
        System.out.println(set);
    }
}
